package cn.school.controller.workmgr;

import cn.school.common.api.CommonPage;
import cn.school.common.api.CommonResult;
import cn.school.workmgr.entity.HygieneDormitory;
import cn.school.workmgr.entity.HygieneDormitoryStatistics;
import cn.school.workmgr.service.HygieneDormitoryStatisticsService;
import cn.school.workmgr.vo.StatisticsVo;
import com.baomidou.mybatisplus.core.metadata.IPage;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

@RestController
@Api(tags = "HygieneShcoolController => 宿舍卫生统计管理")
@RequestMapping("/workmgr/HygieneDormitoryStatiscs")
public class HygieneDormitoryStatiscsController {
    @Autowired
    HygieneDormitoryStatisticsService hygieneDormitoryStatisticsService;

    @ApiOperation("【宿舍卫生统计表】获取列表")
    @GetMapping("/list")
    public CommonResult<CommonPage<HygieneDormitoryStatistics>> list(@RequestParam Map<String, Object> params) {
        // 查询
        IPage<HygieneDormitoryStatistics> iPage = this.hygieneDormitoryStatisticsService.pageSql(params);
        return CommonResult.success(CommonPage.restPage(iPage));
    }
}
